
public class NoQuarterState implements State
{
        Gumballmachine machine;

        public NoQuarterState(Gumballmachine in)
        {
                machine = in;
        }

        public void insertQuarter()
        {
                System.out.println("Quarter Inserted");
                machine.setState(machine.getHasQuarterState());
        }

        public void ejectQuarter()
        {
                System.out.println("I don't have Quarter");
        }

        public void turnCrank()
        {
                System.out.println("Insert Quarter first to turn crank.");
        }

        public void dispense(){}
}
